Most of today's electronic devices comprise microcontrollers for controlling the circuitry in such devices and storing data. Particularly in portable devices, minimizing power consumption is of the utmost importance, since the batteries used for the power supplies are required to have very long lives of several years. In order to save power, microcontrollers are configured to have a low power mode when the device needs only limited power or is inactive. However, in the low power mode, it is still required to save and retain data. For data retention and operation in many microcontrollers, a low power voltage supply is required, having a static current of less than 1 μA and a maximum load current of 1 mA. For the active mode, a load current of 50 mA is required which needs an extra low dropout regulator (LDR). A mode switching mechanism is then required which switches between the active, or high power, mode and the low power mode. Timing of mode switching is critical since spikes during switching must not occur. Also, all of the required circuits must be powered up before usage, which requires a certain mode transition sequence. A problem with mode switching in existing microcontroller units is that there are two regulators or references which are selected by a multiplexer and these require dedicated control signals so that spikes do not occur during switching. Also, the dedicated control signals require special timing for mode transitions. Furthermore, such arrangements require the use of additional power, which is at a premium in portable electronic devices.